<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:ezcomp="http://java.sun.com/jsf/composite/ezcomp">
     
   
    <f:view beforePhase="#{stakeholderPortalManagedBean.initView}">
     <h:head>
        <title>Add Stakeholder Portal</title>
    </h:head>

        <h:body>
            
            <h:form id="sPortalform" enctype="multipart/form-data" prependId="false">
               
                <p:panel header="Add Portal Information">
                  
                    <h:panelGrid columns="2">
                        <h:outputText value="Welcome #{stakeholderPortalManagedBean.userName}"/>
                        <br/>
                        <h:outputText value="Stakeholder Description *: " />
                        <h:inputTextarea id ="sDesc" value="#{stakeholderPortalManagedBean.stakeholderAccountState.stakeholderDesc}" required="true" 
                                         requiredMessage="Please enter a bit of your business" style="width: 440px; height: 140px"/>
                        <h:message for="sDesc"></h:message>
      
                        
                        <br />
                        <h:outputText value="Upload Image: " />
                        <p:fileUpload fileUploadListener="#{mediaUploadManagedBean.handleImageUpload}"
                                      auto="true"
                                      update="imagePreview, msgs" />

                        <h:outputText value="Preview Image: " />
                        <p:graphicImage id="imagePreview" value="#{mediaUploadManagedBean.imageFilePath}" />
                        
                         <p:growl id ="msgs" showDetail="true"></p:growl>
                         <br />
                         <p:commandButton update="msgs" actionListener="#{stakeholderPortalManagedBean.saveStakeholderPortalInfo}" value="Save" ajax="true">
                        </p:commandButton>
                
                       
                    </h:panelGrid>

                </p:panel>
              
                        
            </h:form>

        </h:body>
        
    </f:view>
</ui:composition>
